package com.neusoft.neuiotms.dcam.workflow.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_workorder_baofei_item_sl")
@org.hibernate.annotations.Table(appliesTo = "neuiot_workorder_baofei_item_sl", comment = "总行报废详细表")
public class BaofeiItemSL extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @ManyToOne
    private BaofeiSL main;

    /** 资产名称 */
    @NotBlank(message = "资产名不能为空")
    @Length(max = 255, message = "资产名不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String name;

    /** 资产编号 */
    @NotBlank(message = "资产编号不能为空")
    @Length(max = 255, message = "资产编号不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String code;

    /** 规格型号 */
    @Length(max = 255, message = "规格型号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String specifications;

    /** 序列号 */
    @Length(max = 255, message = "序列号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String serialnumber;

    /** 大类型名称 */
    @Length(max = 255, message = "大类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String bigTypeName;

    /** 大类型编码 */
    @Length(max = 255, message = "大类型编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String bigTypeCode;

    /** 中类型名称 */
    @Length(max = 255, message = "中类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String middleTypeName;

    /** 中类型编码 */
    @Length(max = 255, message = "中类型编码名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String middleTypeCode;

    /** 小中类型名称 */
    @Length(max = 255, message = "小类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeName;

    /** 小类型编码 */
    @Length(max = 255, message = "小类型编码名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeCode;

    /** 金额 */
    @Column(length = 255, nullable = true)
    private Double money;

    /** 残值 */
    @Column(nullable = true)
    private Double salvageValue = 0.0;

    /** 资产状态 */
    @Length(max = 255, message = "资产状态不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String status;
}
